#ifndef _SPI_FLASH_H_
#define _SPI_FLASH_H_

void SPI_FLASH_Init();
uint16 SPI_Flash_ReadID(void);
void SPI_Flash_Wait_Busy(void);
void SPI_Flash_Erase_Sector(uint32 Dst_Addr);
void SPI_Flash_Write_Page(uint8 *pBuffer, uint32 WriteAddr, uint16 NumByteToWrite);
void SPI_Flash_Write_NoCheck(uint8 *pBuffer, uint32 WriteAddr, uint16 NumByteToWrite);
void SPI_Flash_Read(uint8 *pBuffer, uint32 ReadAddr, uint16 NumByteToRead);
void SPI_Flash_Erase_Chip(void);

void SPI_FLASH_SendFlashReadCmd(uint32 addr);
void SPI_FLASH_OPFinish();
uint8 SPI_FLASH_GetData();

#endif
